import React from 'react'
import ReactDOM from 'react-dom/client'
import {HashRouter,BrowserRouter} from 'react-router-dom'
import App from './App'
import {Provider} from './store'

// 根据环境自动切换路由模式
const Router = process.env.NODE_ENV==='production' ? BrowserRouter : HashRouter

const root = ReactDOM.createRoot(document.querySelector('#app'))
root.render(
    <Provider>
        <Router>
            <App/>
        </Router>
    </Provider>
)